package com.cn.user.mapper;

import com.cn.dto.Permission;
import com.cn.dto.UserDto;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserDao {
    UserDto findById(int id);
    int update(UserDto userDto);
    int status(int id);
    int insert(UserDto userDto);
    int delete(int id);
    List<UserDto> findAll();

    List<UserDto> getByName(String username);
    List<Permission> getPermissionsByUserId(Integer id);
}
